<?php $session->flash(); ?> 


<?php if($b_Apply) {?>
<h1 class="note">You have already applied for this vacancy.</h1>
<p>&nbsp;</p>
<p>&nbsp;</p>
<?php }?>


<!--COLUMN 1-->
<div class="FourColGrid_c1">
		<?php 
            if($Vacancy['Vacancy']['Avatar'])
            {
                echo '<img src="'. Router::url('/').'app/webroot/img/avatar/'.$Vacancy['Vacancy']['Avatar'].'" width="100" height="100" alt="Locum">';
            }else
            {
                echo '<img src="'.Router::url('/').'app/webroot/img/avatar.jpg" width="100" height="100" alt="Locum">';
            }
          ?>
</div>
<!--COLUMN 1-->

<!--COLUMN 2-->
<div class="FourColGrid_c2">
<h1 class="TitleOne"><?php $a_Date = explode(',',$Vacancy['Vacancy']['DateRange']); echo $Vacancy['Vacancy']['Title'];?></h1>
<h2 class="TitleTwo"><?php echo $GLOBALS['Country'][$Vacancy['Vacancy']['County_id']];?></h2>
<p><b>Rate of pay</b> - <?php echo '£'.$Vacancy['Vacancy']['HourlyRate'];?> per hour<br>
<b>Milage allowance after</b> - <?php echo $Vacancy['Vacancy']['MilageAllowanceAfterMiles'];?> miles<br>
<b>Milage rate</b> - <?php echo $Vacancy['Vacancy']['MilageRateInPence'];?> per mile<br>
<b>Other expenses</b> - <?php echo $Vacancy['Vacancy']['OtherExpenses'];?><br>
For more information on this vacancy<br><?php echo $html->link(__('click here to view store', true), array('controller'=>'locums','action' => 'view_store/'.$Vacancy['Vacancy']['Store_id']), array('target' => '_blank'));?></p>
<p>&nbsp;</p>
</div>
<!--COLUMN 2-->
    

<!--COLUMN 3-->
<div class="FourColGrid_c3">
<?php echo $form->create('Locum',array('action' => 'apply/'.$Vacancy['Vacancy']['id'],'id'=>'LocumApplyForm'));?>  
<div id="eventCalendarNoCache"></div>
<script>
$(document).ready(function() {
	$("#eventCalendarNoCache").eventCalendar({
		eventsjson: '<?php echo Router::url('/').'vacancies/getJson2/'.$Vacancy['Vacancy']['id'] ?>',
		cacheJson: false,
		multiple: true,
		allowClick:true,
		onlychoose:true,
		jumpMonth:'<?php echo $jump;?>'
	});
});
</script>
<p>Please uncheck the dates you are <b>unavailable</b> on the calendar</p>
<p>&nbsp;</p>
<p>Calendar key</p>
<ul class="listTwo">
<li class="available"> = Vacancy</li>
<li class="unavailable"> = No Vacancy</li>
</ul>
<p>&nbsp;</p>
<?php echo $form->input('event',array('label'=>false,'type'=>'hidden', 'size' => 40,'id'=>'event')); ?>
<?php echo $form->input('vacancy_id',array('label'=>'','type'=>'hidden', 'size' => 40,'value'=>$Vacancy['Vacancy']['id'])); ?>

<?php if(!$b_Apply) {?>
<p><b>Amend hourly rate</b></p>
<?php echo $form->input('HourlyRate',array('type'=>'text','label'=>'','div'=>'')); ?> 
<p>&nbsp;</p>  
<a href="javascript:void(0)" class="TitleFive" style="float: left; width: 100px;" id="btnApply">Apply</a>
<?php }?>
<?php echo $form->end();?>
</div>
<!--COLUMN 3-->

<!--COLUMN 4-->
<div class="FourColGrid_c4">
<h6 class="TitleFive">Vacancy Search</h6>
<?php echo $this->element('search');?>
<p>&nbsp;</p>
<br>
<?php echo $this->element('invite_locum');?> 
</div>
<!--COLUMN 4-->

<script>
    $(document).ready(function(){
	   $('#btnApply').click(function(){
				$('#LocumApplyForm').submit();
        });
    });
</script>
